#include "string.h"


//int main()
//{
//	Greg::string s("hello world");
//	Greg::string s1;
//
//	cout << s.c_str() << endl;
//	cout << s1.c_str() << endl;
//
//	return 0;
//}

namespace Greg
{
	void Test_string1()
	{
		Greg::string s1("hello world");
		cout << s1.c_str() << endl;

		for (size_t i = 0; i < s1.size(); i++)
		{
			s1[i]++;
			cout << s1[i] << " ";
		}
		cout << endl;

		Greg::string::iterator it1 = s1.begin();
		while (it1 != s1.end())
		{
			cout << *it1 << " ";
			++it1;
		}
		cout << endl;

		for (auto e : s1)
		{
			cout << e << " ";
		}

	}

	void Test_string2()
	{
		Greg::string s("hello world");
		//s.append(" xxx");

		cout << s.c_str() << endl;
	}


	void Test_stream()
	{
		Greg::string s1("hello");
		cin >> s1;
		
	}
}


int main()
{
	//Test_string1();
	//Greg::Test_string2();
	Greg::Test_stream();

	return 0;
}



